//获取权限列表判断用户有哪些权限
import Cookies from 'js-cookie'
let permission = {
	inserted: function(el, binding, vnode) {
		// console.log(binding.value,"48456asdasd")
		let info = JSON.parse(Cookies.get('info'));
		let perms = info.perms;
		let value = binding.value;
		for (var i = 0; i < perms.length; i++) {
			if (value.includes(perms[i])) {
				el.style.display = "inline-block";
				break;
			} else {
				el.style.display = "none";
			}
		}
	}
}
export default permission;
